package testServer;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class DBConnection {
	
	//Connection con = null;
	Statement s;
	ResultSet rs;
	
	public DBConnection() {
	// connection to the database
			try {
				
				Connection con = DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
				System.out.println("Connection ok");
				
				s = con.createStatement();
				
				con.setCatalog("test");
				
				s = con.createStatement();
				
			}
			catch (Exception e) {
				System.out.println(e.toString());
			}
	}
	
}
